﻿<%@ Page Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="DetailRecette.aspx.cs" Inherits="WebApplication1.WebForm2" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<h2>
DETAIL RECETTE
</h2>
    <table>
    <tr>
    <td><asp:Label ID="Label1" runat="server" Text="nom"></asp:Label></td>
    <td><asp:TextBox ID="TextBox1" runat="server" ontextchanged="TextBox1_TextChanged"></asp:TextBox></td>    
    <td rowspan="10" valign="top"><asp:GridView ID="DetailIngredient" runat="server" AutoGenerateColumns="False">
                <Columns>
                    <asp:BoundField DataField="nom" HeaderText="nom ingrédient" 
                        SortExpression="nom" />
                    <asp:BoundField DataField="quantite" HeaderText="quantité" 
                        SortExpression="quantite" />
                    <asp:BoundField DataField="unite" HeaderText="unité" 
                        SortExpression="quantite" />
                </Columns>
            </asp:GridView>
            </td>
    </tr>

    <tr>
    <td><asp:Label ID="Label2" runat="server" Text="sous-titre"></asp:Label></td>
    <td><asp:TextBox ID="TextBox2" runat="server" ontextchanged="TextBox2_TextChanged"></asp:TextBox></td>
    </tr>

    <tr>
        <td><asp:Label ID="Label3" runat="server" Text="nombre de personnes"></asp:Label></td>
        <td><asp:TextBox ID="TextBox3" runat="server" ontextchanged="TextBox3_TextChanged"></asp:TextBox></td>
   </tr>

   <tr>
        <td><asp:Label ID="Label4" runat="server" Text="temps de préparation"></asp:Label></td>
        <td><asp:TextBox ID="TextBox4" runat="server" ontextchanged="TextBox4_TextChanged"></asp:TextBox></td>
   </tr>

   <tr>
        <td><asp:Label ID="Label5" runat="server" Text="temps de cuisson"></asp:Label></td>
        <td><asp:TextBox ID="TextBox5" runat="server" ontextchanged="TextBox5_TextChanged"></asp:TextBox></td>
   </tr>

   <tr>
        <td><asp:Label ID="Label6" runat="server" Text="coût"></asp:Label></td>
        <td><asp:TextBox ID="TextBox6" runat="server" ontextchanged="TextBox6_TextChanged"></asp:TextBox></td>
   </tr>

   <tr>
        <td><asp:Label ID="Label7" runat="server" Text="difficulté"></asp:Label></td>
        <td><asp:TextBox ID="TextBox7" runat="server" ontextchanged="TextBox7_TextChanged"></asp:TextBox></td>
   </tr>

   <tr>
        <td><asp:Label ID="Label9" runat="server" Text="préparation"></asp:Label></td>
        <td><asp:TextBox ID="TextBox9" TextMode="multiline" runat="server" 
                ontextchanged="TextBox9_TextChanged"></asp:TextBox></td>
   </tr>

   <tr>
        <td><asp:Label ID="Label10" runat="server" Text="réalisation"></asp:Label></td>
        <td><asp:TextBox ID="TextBox10" TextMode="multiline" runat="server" 
                ontextchanged="TextBox10_TextChanged"></asp:TextBox></td>
   </tr>

   <tr>
        <td><asp:Label ID="Label8" runat="server" Text="source"></asp:Label>
           
        </td>
        <td><asp:TextBox ID="TextBox8" runat="server" ontextchanged="TextBox8_TextChanged"></asp:TextBox>
            
        </td>
   </tr>
   <tr>
   <td></td>
   <td></td>
   <td><asp:Button ID="DeleteButton" runat="server" Text="Effacer" 
           onclick="DeleteButton_Click" />
    <asp:Button ID="UpdateButton" runat="server" Text="Modifier" 
           onclick="UpdateButton_Click" /></td>
   </tr>
   <tr><td>Ajouter l'ingrédient suivant:<br /> <asp:DropDownList ID="DropDownListIng" runat="server" 
        DataSourceID="SqlDataSource1" DataTextField="Nom" 
           DataValueField="IdIngredient" 
           onselectedindexchanged="DropDownListIng_SelectedIndexChanged">
    </asp:DropDownList>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:recherche %>" 
        SelectCommand="SELECT [Nom], [IdIngredient] FROM [Ingredient]">
    </asp:SqlDataSource></td></tr>
    <tr><td> quantité</td>
    <td><asp:TextBox ID="quantite" runat="server" ontextchanged="TextBox11_TextChanged"></asp:TextBox>
    <%--<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="quantite"
            ErrorMessage="La quantité doit être complétée"
            setFocusOnerror="true">*
            </asp:RequiredFieldValidator>
            <asp:RangeValidator ID="RangeValidator2" runat="server" ControlToValidate="quantite"
            ErrorMessage="La quantité doit être numérique" Type="Integer" MinimumValue="0" MaximumValue="10000" >*
            </asp:RangeValidator>--%>
    </td>
  
   </tr>
   </table>
   
</asp:Content>